package Game;

public class Weapon extends Item {
	private static int typeIndex = 0;
	
	public static final int WEAPON_NONE = typeIndex++;
	
	public static final int WEAPON_SWORD_1H = typeIndex++;
	public static final int WEAPON_SPEAR_1H = typeIndex++;
	public static final int WEAPON_AXE_1H = typeIndex++;
	public static final int WEAPON_BLUNT_1H = typeIndex++;
	public static final int WEAPON_DAGGER = typeIndex++;
	
	public static final int WEAPON_SWORD_2H = typeIndex++;
	public static final int WEAPON_SPEAR_2H = typeIndex++;
	public static final int WEAPON_AXE_2H = typeIndex++;
	public static final int WEAPON_BLUNT_2H = typeIndex++;
	
	public static final int WEAPON_BOW = typeIndex++;
	public static final int WEAPON_CROSSBOW = typeIndex++;
	public static final int WEAPON_FIREARM = typeIndex++;
	
	public static final int WEAPON_STAFF = typeIndex++;
	public static final int WEAPON_BOOK = typeIndex++;
	public static final int WEAPON_ORB = typeIndex++;
	
	public static final int WEAPON_KATAR = typeIndex++;
	public static final int WEAPON_KNUCKLE = typeIndex++;
	
	public static final int WEAPON_SHIELD = typeIndex++;
	
	// ATTRIBUTES
	int type;
	
	// METHODS
	public Weapon(String _ID) {
		super(_ID);
	}
	
	public boolean is1H() {
		return (type == WEAPON_SWORD_1H) || (type == WEAPON_SPEAR_1H) || (type == WEAPON_AXE_1H) ||
			(type == WEAPON_BLUNT_1H) || (type == WEAPON_DAGGER) || (type == WEAPON_STAFF);
	}
	
	public boolean is2H() {
		return (type == WEAPON_SWORD_2H) || (type == WEAPON_SPEAR_2H) || (type == WEAPON_AXE_2H) ||
				(type == WEAPON_BLUNT_2H);
	}
	
	public boolean isRanged() {
		return (type == WEAPON_BOW) || (type == WEAPON_CROSSBOW) || (type == WEAPON_FIREARM);
	}
	
	public boolean isSword() {
		return (type == WEAPON_SWORD_1H) || (type == WEAPON_SWORD_2H);
	}
	
	public boolean isSpear() {
		return (type == WEAPON_SPEAR_1H) || (type == WEAPON_SPEAR_2H);
	}
	
	
}
